unit UnitMain;

interface

uses
  Windows, Messages,Math, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;
type
  PIdBytes = ^TIdBytes;
  TIdBytes = array of Byte;
type
  TForm1 = class(TForm)
    Button1: TButton;
    Memo1: TMemo;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
  ms: TMemoryStream;
  i1, i2, i3, i4, i5, i6, i7, i, count: Integer;
  f: Single;
  b:TIdBytes;
begin
  setlength(b,4) ;
  ms := TMemoryStream.Create;
  try
    ms.LoadFromFile('D:\vipdoc\sh\lday\sh600581.day');
    ms.Position := 0;
    count := Math.floor(ms.Size / 32) - 1;
    for i := 0 to count do
    begin
      ms.Read(i1, 4);
      ms.Read(i2, 4);
      ms.Read(i3, 4);
      ms.Read(i4, 4);
      ms.Read(i5, 4);
     // ms.Read(b[0], 4);
     // f:=dbds(b[1],b[0],b[3],b[2]);
      ms.Read(f, 4);

      ms.Read(i6, 4);
      ms.Read(i7, 4);

      Memo1.Lines.Add(inttostr(i1) + ' ' + floattostr(i2/100) + ' ' + floattostr(i3/100) + ' ' + floattostr(i4/100)+ ' ' + floattostr(i5/100) + ' ' + FloatToStr(f)  + ' ' + inttostr(i6) + ' ' + inttostr(i7));
    end;

  finally
    ms.Free;
  end;


end;

end.
